import Vue from 'vue'
import Router from 'vue-router'
import Spray from '@/components/Spray'
//import Schedule from '@/components/Schedule'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: function (resolve) {
        require(['@/components/index.vue'], resolve)
      }
    },
    {
      path: '/spray',
      name: 'Spray',
      component: Spray
    },
    {
      path: '/changeCity',
      name: 'changeCity',
      component: function (resolve) {
        require(['@/components/changeCity.vue'], resolve)
      }
    },
    {
      path: '/schedule',
      name: 'Schedule',
      component: function (resolve) {
        require(['@/components/Schedule.vue'], resolve)
      }
    },
    {
      path: '/pay',
      name: 'Pay',
      component: function (resolve) {
        require(['@/components/Pay.vue'], resolve)
      }
    },
    // 选车型页面
    {
      path: '/selectCar',
      name: 'selectCar',
      component: function (resolve) {
        require(['@/components/selectCar/selectCar.vue'], resolve)
      }
    },
    {
      path: '/selectModel',
      name: 'selectModel',
      component: function (resolve) {
        require(['@/components/selectCar/selectModel.vue'], resolve)
      }
    },
    {
      path: '/selectSeries',
      name: 'selectSeries',
      component: function (resolve) {
        require(['@/components/selectCar/selectSeries.vue'], resolve)
      }
    },
    {
      path: '/chooseCity',
      name: 'ChooseCity',
      component: function (resolve) {
        require(['@/components/ChooseCity.vue'], resolve)
      }
    }, 
    {
      path: '/chooseCar',
      name: 'ChooseCar',
      component: function (resolve) {
        require(['@/components/ChooseCar.vue'], resolve)
      }
    },
    {
      path: '/scroll',
      name: 'Scroll',
      component: function (resolve) {
        require(['@/components/scroll.vue'], resolve)
      }
    },
    {
      path: '/carShop',
      name: 'carShop',
      component: function (resolve) {
        require(['@/components/carShop/carShop.vue'], resolve)
      }
    }
  ]
})
